package algo;

import java.util.HashMap;
import java.util.Map;

public class HashMapTest {
    public static void main(String[] args) {
        Map<String, Integer> map = new HashMap<>();
        map.put("1", 1);
        map.put("2", 2);
        System.out.println(map.get("2"));
        for(Map.Entry<String, Integer> entry : map.entrySet()){
            if(entry.getKey().equals("2")) entry.setValue(22);
        }
        System.out.println(map.get("2"));
    }
}
